<#import "/common/function.ftl" as fn>
<@fn.header _title="">
<script type="text/javascript" src="${base}/resources/script/jquery.pager.js"></script>
</@fn.header>

<body style="width:100%" class="list">
<form id="listForm" action="list" method="post">
	<h2><img src="${base}/resources/style/images/iconDivM.gif" width="16" height="16" />字典管理</h2>
	<div class="title marginTop15">
		<div class="title-middle">
			<div class="title-left"></div>
			<div class="title-caption">
				<label style="font-weight:bold;">类别名称: </label>
				<input type="hidden" name="propertyList" value="typeName"/>
				<input type="hidden" name="compareTypeList" value="like"/>
				<input type="text" name="keywordList" value="${(pager.keywordList[0])!}" />
				<label style="font-weight:bold;">属性名称: </label>
				<input type="hidden" name="propertyList" value="name"/>
				<input type="hidden" name="compareTypeList" value="like"/>
				<input type="text" name="keywordList" value="${(pager.keywordList[1])!}" />
				<label>每页显示: </label>
				<select name="pageSize" id="pageSize">
					<option value="10"<#if pager.pageSize == 10> selected</#if>>10</option>
					<option value="20"<#if pager.pageSize == 20> selected</#if>>20</option>
					<option value="50"<#if pager.pageSize == 50> selected</#if>>50</option>
					<option value="100"<#if pager.pageSize == 100> selected</#if>>100</option>
				</select>
				<input type="submit" id="searchButton" class="button" value="搜 索" />
			</div>
            <div class="title-right">
            	<img src="${base}/resources/style/images/action_add.gif" width="16" height="16" /><a href="#" onclick="location.href='add'">添加字典</a>
            </div>
		</div>
	</div>
	<table class="table2" id="userListTable">
		<tr>
			<th>类别名称</th>
			<th>属性名称</th>
			<th>字典代码</th>
			<th>是否有子类别</th>
			<th>操作</th>
		</tr>
		<#list pager.result as dictionary>
		<tr>
			<td>
				${dictionary.typeName}
			</td>
			<td>
				${dictionary.name}
			</td>
			<td>
				${dictionary.code}
			</td>
			<td>
				<#if dictionary.hasChild>有<#else>没有</#if>
			</td>
			<td>
				<a href="delete?id=${dictionary.id}" title="删除">[删除]</a>
			</td>
		</tr>
		</#list>
	</table>
	<@fn.pagerCode />
</form>
</body>
</html>
